<?php
namespace pinduoduo\Request;

use pinduoduo\AbstractInterface\Request;

class PddDdkOauthGoodsDetailRequest extends Request
{
    /**
     * 查询多多进宝商品详情
     * @var string
     */
    private $type = 'pdd.ddk.oauth.goods.detail';

    /**
     * 自定义参数，为链接打上自定义标签；自定义参数最长限制64个字节；格式为： {"uid":"11111","sid":"22222"} ，其中 uid 用户唯一标识，可自行加密后传入，每个用户仅且对应一个标识，必填； sid 上下文信息标识，例如sessionId等，非必填。该json字符串中也可以加入其他自定义的key。（如果使用GET请求，请使用URLEncode处理参数）
     * @var
     */
    private $customParameters;

    /**
     * 商品主图类型：1-场景图，2-白底图，默认为0
     * @var
     */
    private $goodsImgType;

    /**
     * 商品goodsSign，支持通过goodsSign查询商品。goodsSign是加密后的goodsId, goodsId已下线，请使用goodsSign来替代。使用说明：https://jinbao.pinduoduo.com/qa-system?questionId=252
     * @var
     */
    private $goodsSign;

    /**
     * 是否获取sku信息，默认false不返回。（特殊渠道权限，需额外申请）
     * @var
     */
    private $needSkuInfo;

    /**
     * 推广位id
     * @var
     */
    private $pId;

    /**
     * 搜索id，建议填写，提高收益。来自pdd.ddk.goods.recommend.get、pdd.ddk.goods.search、pdd.ddk.top.goods.list.query等接口
     * @var
     */
    private $searchId;

    /**
     * 招商多多客ID
     * @var
     */
    private $zsduoId;

    public function getType()
    {
        return $this->type;
    }

    public function setType($type)
    {
        $this->type = $type;
    }

    public function setCustomParameters($customParameters)
    {
        $this->customParameters = $customParameters;
    }

    public function getCustomParameters()
    {
        return $this->customParameters;
    }

    public function setGoodsImgType($goodsImgType)
    {
        $this->goodsImgType = $goodsImgType;
    }

    public function getGoodsImgType()
    {
        return $this->goodsImgType;
    }

    public function setGoodsSign($goodsSign)
    {
        $this->goodsSign = $goodsSign;
    }

    public function getGoodsSign()
    {
        return $this->goodsSign;
    }

    public function setNeedSkuInfo($needSkuInfo)
    {
        $this->needSkuInfo = $needSkuInfo;
    }

    public function getNeedSkuInfo()
    {
        return $this->needSkuInfo;
    }

    public function setPId($pId)
    {
        $this->pId = $pId;
    }

    public function getPId()
    {
        return $this->pId;
    }

    public function setSearchId($searchId)
    {
        $this->searchId = $searchId;
    }

    public function getSearchId()
    {
        return $this->searchId;
    }

    public function setZsduoId($zsduoId)
    {
        $this->zsduoId = $zsduoId;
    }

    public function getZsduoId()
    {
        return $this->zsduoId;
    }

    public function getParams()
    {
        $params = [
            'type'              => $this->type,
            'custom_parameters' => $this->customParameters,
            'goods_img_type'    => $this->goodsImgType,
            'goods_sign'        => $this->goodsSign,
            'need_sku_info'     => $this->needSkuInfo,
            'p_id'              => $this->pId,
            'search_id'         => $this->searchId,
            'zs_duo_id'         => $this->zsduoId,
        ];
        return array_filter($params);
    }
}
